package cn.iocoder.yudao.module.system.controller.admin.examtest.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 考试信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ExamTestBaseVO {

    @Schema(description = "考试名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024年第一次月考")
    @Size(max = 200, message = "考试名称长度不能超过200个字符")
    private String examName;

    @Schema(description = "考试类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "月考")
    @Size(max = 50, message = "考试类型长度不能超过50个字符")
    private String examType;

    @Schema(description = "年级", example = "高二")
    private String gradeLevel;

    @Schema(description = "学期", example = "2024-2025学年度第二学期")
    private String semester;

    @Schema(description = "科目方向", example = "物理方向")
    private String subjectDirection;

    @Schema(description = "考试类别", example = "期中素质测试")
    private String examCategory;

    @Schema(description = "班级ID列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1,2,3]")
    private List<Long> classIds;

    @Schema(description = "考试时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime examDate;

    @Schema(description = "总分", example = "750.00")
    private BigDecimal totalScore;

    @Schema(description = "科目配置", example = "{\"chinese\":150,\"math\":150,\"english\":150}")
    private String subjectConfig;

    @Schema(description = "考试说明", example = "本次考试为月考，请认真对待")
    private String description;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "状态不能为空")
    private Integer status;

}